<?php 
/**
 * [PHPFOX_HEADER]
 * 
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package  		Module_Feed
 * @version 		$Id: display.html.php 4176 2012-05-16 10:49:38Z Raymond_Benc $
 */
 
defined('PHPFOX') or exit('NO DICE!'); 

?>
{foreach from=$aItems key=iKey item=aValue}

    <div class="row {if $iKey % 2 == 0} odd{else} even{/if} {if $iKey == count($aItems) -1 || $iKey == count($aItems)-2} lastrow{/if}">
        <span>{$aValue.name}</span>
        <a href="#" id="js_category_{$aValue.category_id}_join" 
           {if $aValue.is_joined}
           style="display: none;"
           {/if}
           onclick="$.ajaxCall('survey.joinCategory','id={$aValue.category_id}');$(this).hide();$('#js_category_{$aValue.category_id}_unjoin').show();return false;" 
           class="join">
            Join
        </a>
        <a href="#" id="js_category_{$aValue.category_id}_unjoin" 
           {if !$aValue.is_joined}
           style="display: none;"
           {/if}
           onclick="$.ajaxCall('survey.joinCategory','id={$aValue.category_id}');$(this).hide();$('#js_category_{$aValue.category_id}_join').show();return false;" 
           class="unjoin join">
            Joined
        </a>
    </div>

{/foreach}
